<?php
include __DIR__ . '/functions.php';
spl_autoload_register(function ($name) {
    include str_replace('\\', '/', $name) . '.php';
});


set_error_handler(function ($errno, $errstr, $errfile, $errline) {
    p_log($errfile.'['.$errline.']:'.$errstr);
});

set_exception_handler(function ($e) {
    p_log('['.$e->getLine().']:'.$e->getMessage());
});